<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:l="clr-namespace:XRoute">

    <Style TargetType="{x:Type l:RouteImage}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type l:RouteImage}">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid>
                            <Image Source="{TemplateBinding Source}"
                                   Stretch="Fill" HorizontalAlignment="Left" VerticalAlignment="Top"
                                   Width="{Binding Path=Source.PixelWidth, RelativeSource={RelativeSource Self}}"
                                   Height="{Binding Path=Source.PixelHeight, RelativeSource={RelativeSource Self}}" />
                            <l:DrawingHost x:Name="PART_RouteDrawing"
                                           HorizontalAlignment="Left" VerticalAlignment="Top">
                                <l:DrawingHost.Effect>
                                    <DropShadowEffect Color="White" BlurRadius="5" Opacity="1.0" ShadowDepth="0" Direction="0" />
                                </l:DrawingHost.Effect>
                            </l:DrawingHost>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
